import React from 'react'
import './style.less'
import classNames from 'classnames'

const Pagination = (props) => {
    // ES6填充方法
    let arr = new Array(props.len).fill(1)
    let currentIndex = props.currentIndex
    return (
        <div className='swiper-pagination'>
            <ul>
                {
                    arr.map((ele,index) => {
                        return <li key={index} className={ classNames({'selected':currentIndex ===index}) }></li>
                    })
                }
            </ul>
        </div>
    )
}
export default Pagination